package com.cmcc.xdr.util;

public enum Interface {
	Composed(0,"Composed"),
	Uu(1,"Uu"),
	X2(2,"X2"),
	UE_MR(3,"UE_MR"),
	Cell_MR(4,"Cell_MR"),
	S1_MME(5,"S1-MME"),
	S6a(6,"S6a"),
	S11(7,"S11"),
	S10(8,"S10"),
	SGs(9,"SGs"),
	S5_S8(10,"S5/S8"),
	S1_U(11,"S1-U"),
	Gn_C(12,"Gn-C"),
	Gm(13,"Gm"),
	Mw(14,"Mw"),
	Mg(15,"Mg"),
	Mi(16,"Mi"),
	Mj(17,"Mj"),
	ISC(18,"ISC"),
	Sv(19,"Sv"),
	Cx(20,"Cx"),
	Dx(21,"Dx"),
	Sh(22,"Sh"),
	Dh(23,"Dh"),
	Zh(24,"Zh"),
	Gx(25,"Gx"),
	Rx(26,"Rx"),
	I2(27,"I2");
	
	// 成员变量  
    private int index;  
    private String name;  
    // 构造方法  
    private Interface(int index,String name) {  
        this.index = index;  
        this.name = name;  
    }  
    // 普通方法  
    public static String getName(int index) {  
        for (Interface c : Interface.values()) {  
            if (c.getIndex() == index) {  
                return c.name;  
            }  
        }  
        return null;  
    }  
    
    public static Integer getIndex(String name){
    	for(Interface c : Interface.values()){
    		if(c.getName().equals(name)){
    			return c.getIndex();
    		}
    	}
    	return null;
    }
    // get set 方法  
    public String getName() {  
        return name;  
    }  
    public void setName(String name) {  
        this.name = name;  
    }  
    public int getIndex() {  
        return index;  
    }  
    public void setIndex(int index) {  
        this.index = index;  
    }  
}
